using UnityEditor;

public class AutoSetSpriteFormat : AssetPostprocessor
{
    void OnPreprocessTexture()
    {
        if (TextureImporterUtility.IsFilter(assetPath))
            return;

        if (assetImporter is TextureImporter textureImporter)
        {
            TextureImporterType type = TextureImporterUtility.GetTextureImporterType(assetPath);

            ITextureImpoter importer = TextureImporterFactory.Create();

            importer.Import(textureImporter, type);
        }
    }
}